# -*- coding:utf-8 -*-
"""
对网络连接操作
"""
import os



def mappingDriver(drive_name,ip,account=None,password=None):
    """
    映射盘符
    :param drive_name:
    :param path:
    :return:
    """
    if account and password:
        cmd = 'net use {}: \\{}\c$ "{}" /user:"{}"'.format(drive_name,ip,password,account)
    else:
        cmd = 'net use {}: {}'.format(drive_name, ip)

    os.system(cmd)







